<?php
namespace cms\modules\v1\controllers;

use cms\modules\v1\models\access\ModuleActions;
use cms\modules\v1\models\user\UserReal;
use cms\modules\v1\models\userFund\UserMoneyLog;
use common\models\Functions;
use common\models\Status;
use Yii;
use yii\filters\auth\HttpHeaderAuth;
use yii\helpers\ArrayHelper;

/**
 * 报表控制器 controller
 */
class KycController extends DefaultController
{
    public $modelClass = '';

    public function behaviors()
    {
        return ArrayHelper::merge(parent::behaviors(), [
            'authenticator' => [
                'class' =>  HttpHeaderAuth::className(),
                'header' => 'access-token',
                'optional' => [

                ]
            ]
        ]);
    }

    public function actionCancel() {
        if (Yii::$app->request->isPost) {
            return (new UserReal())->cancel();
        }
    }

    public function actionDo() {
        if (Yii::$app->request->isPost) {
            return (new UserReal())->doKyc();
        }
    }
}
